package com.example.listener;

import com.alibaba.excel.context.AnalysisContext;
import com.alibaba.excel.metadata.Cell;
import com.alibaba.excel.read.listener.ReadListener;
import com.alibaba.excel.read.metadata.holder.ReadRowHolder;
import com.example.pojo.DemoData;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;

public class MyReadListener<T> implements ReadListener<T> {
    List<T> list=new ArrayList<>();
    @Override
    public void invoke(T data, AnalysisContext analysisContext) {
        list.add(data);
    }

    @Override
    public void doAfterAllAnalysed(AnalysisContext analysisContext) {

    }
    public List<T> getData(){
        return list;
    }
}
